package com.umakr.ax.app.web;

import com.umakr.ax.common.model.Feedback;
import com.umakr.ax.common.service.FeedbackService;
import com.umakr.ax.core.base.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author umakr
 * @date 2018/5/17
 */

@Controller
@RequestMapping("/api/feedbackInfo")
public class FeedbackAppController extends AbstractController {

    @Autowired
    FeedbackService feedbackService;

    @PostMapping("/saveFeedbackInfo")
    @ResponseBody
    public Object saveFeedbackInfo(ModelMap modelMap, Feedback feedback){
        return setSuccessModelMap(modelMap,feedbackService.saveFeedbackInfo(feedback));
    }
}
